package org.example.springboot3.mapper;

import org.apache.ibatis.annotations.Select;
import org.example.springboot3.entity.Blog;
import java.util.List;

public interface BlogMapper {

    List<Blog> selectAll(Blog blog);

    void insert(Blog blog);

    void update(Blog blog);

    void delete(Integer id);

    @Select("select * from `article` where id = #{id}")
    Blog selectById(Integer id);

    @Select("select count(*) from article where time like '%${date}%'")
    Integer selectCountByDate(String date);
}//
